home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr28
/
par300.zip
/
EXAMPL02.STX
< prev
next >
Wrap
Text File
|
1995-04-12
|
2KB
|
25 lines
;C
┌─────────────────────────────────────────────────────────────────────────────┐
│ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ EXAMPLE # 2 ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ │
│ THE INPUT FILE: Inventory report, generated by an accounting program │
│ │
│ WHAT WE WANT: Copy certain fields into a comma-delimited file so that │
│ the data can then be imported into a spreadsheet. The │
│ file must contain the following fields: Reference Number, Price, Quantity, │
│ Part Number, and Description. │
│ │
│ HOW WE DO IT: We copy data from fixed columns, tidy them up, put quotes │
│ around them, then send them to the output file. However, │
│ certain lines must be checked to see if they contain valid data. For │
│ example, lines containing "Date:" between columns 1 and 8 are header lines, │
│ not data. Also, since the input data for each item is spread over more │
│ than one line, we must also keep a counter (named ITEMCNTR) to tell us │
│ which line we're looking at. │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
;P